
import pygame
import pygame_gui

pygame.init()

window_size = (800, 600)
window_surface = pygame.display.set_mode(window_size)
clock = pygame.time.Clock()

manager = pygame_gui.UIManager(window_size, "theme2.json")

# Adjust the size of the dropdown menu
dropdown = pygame_gui.elements.UIDropDownMenu(
    options_list=['Option 1', 'Option 2', 'Option 3'],
    starting_option='Option 1',
    relative_rect=pygame.Rect((100, 100), (300, 50)),  # Increased width and height
    manager=manager
)

running = True
while running:
    time_delta = clock.tick(60) / 1000.0
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False

        manager.process_events(event)

    manager.update(time_delta)
    window_surface.fill((0, 0, 0))
    manager.draw_ui(window_surface)

    pygame.display.update()

pygame.quit()
